import React, {Component} from 'react';
import {
    StyleSheet,
    View,
    Text,
    Button

} from 'react-native';
import  SecondPage from  "./SecondPage"

export  default  class FirstPage extends  Component{
    static navigationOptions={
        // title:"第一个界面",
        // headerRight: <Button title='Info'/>
        header:null
    }
     render(){
         const { navigate } = this.props.navigation;
         return(
             <View style={styles.container}>
               {/*<Button*/}
                       {/*title="点击"*/}
                       {/*onPress={() => navigate('SecondPage', {name: 'abc'})}>*/}
               {/*</Button>*/}
                 <Text  onPress={() => navigate('SecondPage', {name: 'abc'})}>点击</Text>
             </View>
         )
     }
}

const  styles=StyleSheet.create({
    container:{
        backgroundColor:"red",
    }
})